-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: removing last rule from firewall fails with invalid_input error #696
fix: removing last rule from firewall fails with invalid_input error #696
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice catch!
Could you update the tests to check for an empty array? This line should have []hcloud.FirewallRule{}
instead of nil
: https://github.com/hetznercloud/cli/blob/main/internal/cmd/firewall/delete_rule_test.go#L39
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #696 +/- ##
=======================================
Coverage 58.78% 58.78%
=======================================
Files 179 179
Lines 6536 6536
=======================================
Hits 3842 3842
Misses 2087 2087
Partials 607 607 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
Updated the title for our Changelog.
🤖 I have created a release *beep* *boop* --- ## [1.43.0](v1.42.0...v1.43.0) (2024-04-03) ### Features * allow deletion of multiple resources at once ([#719](#719)) ([3b896fe](3b896fe)) * improve missing argument error messages ([#711](#711)) ([e7f9e74](e7f9e74)) * **server:** allow JSON & YAML output in reset-password ([#716](#716)) ([373287b](373287b)), closes [#715](#715) ### Bug Fixes * removing last rule from firewall fails with invalid_input error ([#696](#696)) ([acab17c](acab17c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
If you try to delete last firewall rule, rule is
null
but should be[]
, resulting in error messagehcloud firewall delete-rule --direction in --protocol tcp --source-ips '8.8.8.8/32' --port 443 f2b